/*
 * FileName:  GridTag.java
 * Description:  グリッドタグ
 * History:      2010-9-16 (廖宝俊) 1.0 Create
 */
package com.sn.system.tangs.tag;

import com.opensymphony.xwork2.util.ValueStack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

public class GridTag extends ComponentTagSupport {
	/** ページデーターの名 */
    private String page;

    /** ページを分ける　action　URL */
    private String action;

    /** CSSのid */
    private String id;

    /** 検索の条件の名 */
    private String condition;

    /** 記録のユニットの名 */
    private String unit;

    /** ページを分ける　action　URL　のnamespace */
    private String namespace;

    /** CSSのClass */
    private String cssClass;

    /** 列幅 */
    private String width;

    /** 列のalign */
    private String align;


    public void setWidth(String width) {
		this.width = width;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}

    public void setCssClass(String cssClass) {
		this.cssClass = cssClass;
	}

	public void setAlign(String align) {
		this.align = align;
	}

    public Component getBean(ValueStack arg0, HttpServletRequest arg1, HttpServletResponse arg2) {
        return new Grid(arg0);
    }

	public void setCondition(String condition) {
		this.condition = condition;
	}

    /**
     * パラメータを取りする
     */
    protected void populateParams() {
        super.populateParams();

        Grid grid = (Grid)component;
        grid.setPage(page);
        grid.setAction(action);
        grid.setId(id);
        grid.setUnit(unit);
        grid.setNamespace(namespace);
        grid.setCssClass(cssClass);
        grid.setWidth(width);
        grid.setAlign(align);
        grid.setCondition(condition);
    }








}
